import request from "@/utils/requestExam";

// 查询试题列表
export function listQuestion(query) {
  return request({
    url: '/api/uf/boostor/exam/question/ExamQuestionRest/searchByPage/v1',
    method: 'post',
    data: query
  })
}

// 根据试题ID查询试题详细信息
export function getQuestionByQuestionId(questionId) {
  return request({
    url: '/api/uf/boostor/exam/question/ExamQuestionRest/selectQuestionById/' + questionId,
    method: 'get'
  })
}

// 新增试题信息
export function addQuestion(data) {
  return request({
    url: '/api/uf/boostor/exam/question/ExamQuestionRest/add/v1',
    method: 'post',
    data: data
  })
}

// 修改试题信息
export function updateQuestion(data) {
  return request({
    url: '/api/uf/boostor/exam/question/ExamQuestionRest/edit/v1',
    method: 'put',
    data: data
  })
}

// 删除试题信息
export function delQuestion(questionIds) {
  return request({
    url: '/api/uf/boostor/exam/question/ExamQuestionRest/remove/' + questionIds,
    method: 'delete'
  })
}

// 下载试题导入模板
export function importTemplate() {
  return request({
    url: '/exam/question/importTemplate',
    method: 'get'
  })
}

// 导出试题
export function exportQuestion(query) {
  return request({
    url: '/exam/question/export',
    method: 'get',
    params: query
  })
}
